package common.data.report
{
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.RemoteObject;

	/**
	 * 定位服务类
	 */
	public class StaffRouteReportService extends RemoteObject
	{
		public var queryStaffRouteDataCallBack:Function;
		public var queryStaffRouteAndGpsCallBack:Function;
		
		
		public function StaffRouteReportService() {
			super("staffRouteReportService");
			this.showBusyCursor = true;
			
			this.getOperation("queryStaffRouteData").addEventListener(ResultEvent.RESULT,queryStaffRouteDataResult,false,0,true);
			this.getOperation("queryStaffRouteAndGps").addEventListener(ResultEvent.RESULT,queryStaffRouteAndGpsResult,false,0,true);
		}
		
		public function queryStaffRouteData(staffId:String,startDate:String,endDate:String,offset:Number):void{
			this.getOperation("queryStaffRouteData").send(staffId,startDate,endDate,offset);
		}
		
		private function queryStaffRouteDataResult(e:ResultEvent):void{
			queryStaffRouteDataCallBack.apply(this,[e]);
		}
		
		public function queryStaffRouteAndGps(staffId:String,routeAssignId:String,startDate:String,endDate:String,offset:Number):void{
			this.getOperation("queryStaffRouteAndGps").send(staffId,routeAssignId,startDate,endDate,offset);
		}
		
		private function queryStaffRouteAndGpsResult(e:ResultEvent):void{
			queryStaffRouteAndGpsCallBack.apply(this,[e]);
		}
	}
}	